package com.itheima.test2;

import java.util.StringJoiner;

public class StringJoinerDemo1 {
    public static void main(String[] args) {
        StringJoiner sj = new StringJoiner(",","[","]");//参数:分隔符 , 可选开始符号、结束符号

        sj.add("aaa").add("bbb");
        int len = sj.length();
        System.out.println(len);
        System.out.println(sj);
        System.out.println(sj.toString());

    }
}
